package com.dalei.vdsmanager.management.vds.service;

import java.io.Serializable;
import java.util.List;

import com.dalei.vdsmanager.management.vds.dao.VDSDeviceInformation;
import com.dalei.vdsmanager.management.vds.dao.VDSDeviceInformationDao;

public class VDSDeviceInformationServiceImpl implements
		VDSDeviceInformationService, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6574238263439261631L;

	private VDSDeviceInformationDao vdsDeviceInformationDao;

	public VDSDeviceInformationDao getVdsDeviceInformationDao() {
		return vdsDeviceInformationDao;
	}

	public void setVdsDeviceInformationDao(
			VDSDeviceInformationDao vdsDeviceInformationDao) {
		this.vdsDeviceInformationDao = vdsDeviceInformationDao;
	}

	@Override
	public List<VDSDeviceInformation> getVDSDeviceInformations() {
		// TODO Auto-generated method stub
		return vdsDeviceInformationDao.findVDSDeviceInformations();
	}

	@Override
	public VDSDeviceInformation getVDSDeviceInformationById(int id) {
		// TODO Auto-generated method stub
		return vdsDeviceInformationDao.findVDSDeviceInformationById(id);
	}

	@Override
	public void removeVDSDeviceInformation(int id) {
		// TODO Auto-generated method stub
		VDSDeviceInformation vdsDeviceInformation = getVDSDeviceInformationById(id);
		if (vdsDeviceInformation != null) {
			vdsDeviceInformationDao
					.deleteVDSDeviceInformation(vdsDeviceInformation);
		}
	}

}
